<%@ page import="xyz.keyon.bean.Student" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../css/bootstrap.css">
    <title>学生详细信息页面</title>
</head>
<body>
    <%
        //获取request域中的数据
        Student student = (Student)request.getAttribute("student");
        //将数据展示到页面中（通过表单显示，以便增加修改功能）
    %>

    <form method="post" action="UpdateStudentBySnoServlet">
        <div class="form-group">
            <label for="InputSno">学号：</label>
            <input type="text" name="sno" value="<%=student.getSno() %>"  readonly="readonly" class="form-control" id="InputSno" placeholder="Enter Sno">
        </div>
        <div class="form-group">
            <label for="InputSname">姓名：</label>
            <input type="text" name="sname" value="<%=student.getSname() %>" class="form-control" id="InputSname" placeholder="Enter Sname">
        </div>
        <div class="form-group">
            <label for="InputSage">年龄：</label>
            <input type="text" name="sage" value="<%=student.getSage() %>" class="form-control" id="InputSage" placeholder="Enter Sno">
        </div>
        <div class="form-group">
            <label for="InputSaddress">地址：</label>
            <input type="text" name="saddress" value="<%=student.getSaddress() %>" class="form-control" id="InputSaddress" placeholder="Enter Sname">
        </div>
        <input type="submit" value="修改" class="btn btn-outline-dark"/>
        <a href="QueryAllStudentsByPageServlet" class="btn btn-outline-dark">返回</a>
    </form>

</body>
</html>
